package com.example.myapplication;

import android.app.Activity;
import android.os.Bundle;
//利用一个单例模式的Activity栈来管理所有Activity
public class BaseActivity extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // 添加Activity到堆栈
        MyApplication.getInstance().addActivity(this);
    }

}

